package com.squapsource.project_euler;

public class Problem5 {

	// HACK!!!!!!
	public static void main(String[] args) {
		int result = 0;
		for (int i = 20; !isDivisibleByAll(i); i += 20)
			result = i;
		System.out.println(result += 20);

	}

	private static boolean isDivisibleByAll(int checkNum) {
		return checkNum % 20 == 0 && checkNum % 19 == 0 && checkNum % 18 == 0
				&& checkNum % 17 == 0 && checkNum % 16 == 0
				&& checkNum % 15 == 0 && checkNum % 14 == 0
				&& checkNum % 13 == 0 && checkNum % 12 == 0
				&& checkNum % 11 == 0;
	}
}
